package com;

import org.apache.ibatis.session.SqlSession;

public class TestSelect {

    public static void main(String[] args) {
        MyBatisSqlSessionFactory factory = new MyBatisSqlSessionFactory();
        SqlSession sqlSession = factory.getMyBatisSqlSessionFactory().openSession();
        TestDao testDao = sqlSession.getMapper(TestDao.class);
        System.out.println(testDao);
        
//        查询
        Car car = testDao.getCar(2);
        System.out.println(car.getName());
    }
}
